package com.example.weather.sdk;

import android.app.Application;
import android.content.Context;

import com.qweather.sdk.view.HeConfig;

import java.util.logging.Logger;

public class MyApplication extends Application {
    //获取屏幕的高，宽
    private static MyApplication instance = null;

    public Logger log;

    @Override
    public void onCreate() {
        super.onCreate();
        HeConfig.init("HE2010280807421044", "48a79cbe0409403ca4865aa72d8b9691");
        //切换至开发版服务
        HeConfig.switchToDevService();
    }

    /**
     * 获得实例
     *
     * @return
     */
    public static MyApplication getInstance() {
        return instance;
    }

    /**
     * 获取context对象
     */
    public static Context getContext() {
        return instance.getApplicationContext();
    }
}
